<script language="JavaScript">
//<!--
/*function f_initOther() {
	var isUse = document.all("sj_target.is_use").value;
	var rawId = document.all("sj_target.raw_id").value;
	var disable_year = document.all("sj_target.disable_year").value;
	if ('1' == isUse || disable_year){
		document.getElementById("formdelete").disabled = true;
		document.getElementById("save").disabled = true;
		var objs = ["stock_yellowalertpec", "stock_redalertpec", "stock_ctrlpec", 
					"consume_yellowalertpec", "consume_redalertpec", 
					"consume_ctrlpec", "is_use", "ctrl_type","target_name",
					"memo"];
		for(var i = 0; i < objs.length; i++){
			document.all("sj_target."+objs[i]).disabled = true;
			document.all("sj_target."+objs[i]).className = "formDisabled";
		}
	}
	else{
		document.getElementById("adjust").disabled = true;
	}
	if (rawId){
		document.all("sj_target.is_use").disabled = true;
	}
	document.all("sj_target.enable_year").style.textAlign = "center";
	document.all("sj_target.disable_year").style.textAlign = "center";
}
*/
function f_save2(){
	var isPass = true;
	var checkValues = ["stock_yellowalertpec", "stock_redalertpec", "stock_ctrlpec", 
					   "consume_yellowalertpec", "consume_redalertpec", "consume_ctrlpec"];
	for(var i = 0; i < checkValues.length; i++){
		var obj = document.all("sj_target."+checkValues[i]);
		if (obj.value && parseFloat(obj.value) > 100.0){
			isPass = confirm(document.all("label_sj_target."+checkValues[i]).innerHTML.replace('*', '')+'<eam:message key="text.sj.err.value" />');
			if (!isPass) obj.focus();
		}
	}
	if (isPass){
		//var isUse = document.all("sj_target.is_use").value;
		//if ('1' == isUse){
		//	isPass = confirm('<eam:message key="text.sj.target.isuse" />');
		//}
		//if (isPass) f_save();
		f_save();
	}
}

/*function f_adjust(){
	var keyId = document.all("sj_target.target_id").value;
	var enable_year = document.all("sj_target.enable_year").value;
	if (keyId.length == 0) {
		alert("<eam:message key="common.text.noselrecord" />");
		return ;
	}

	document.forms(formName).ActionType.value = "adjust";
	document.forms(formName).action += "?keyId=" + keyId+"&enable_year="+enable_year;
	document.forms(formName).submit();
}
*/
//-->
</script>